'GOST 8419

'GCV_FRONT = 2
'GCV_LEFT = 4
'GCV_RIGHT = 5
'GCV_EXTENDED = 7
'GCV_SIMPLIFIED = 8
'GCV_STANDARD = 9
'SIDE = GCV_FRONT

'DETAIL_LEVEL = GCV_STANDARDm

hatchAngle  = 45                  
'hatchStep= 2   

'PAR_din=120
'PAR_D=165
'PAR_T=80
'PAR_N=5
'PAR_B=5
'PAR_r=1.1

''PAR_AXIS = 1

alfa=10
ralfa=alfa*3.1416/180
din2= PAR_din/2
D2=PAR_D/2
b1= PAR_N/2
b2=PAR_T/2
r=PAR_r
H=D2-din2
Bvr=b2-b1
C2=b1+(b2-b1)/2
xr1=b1+Bvr*0.06
yr1=din2+H*0.42
Dw2=H*0.18
Lw=(C2-PAR_B/2-xr1)/cos(ralfa)
xr2=xr1+Lw*cos(ralfa)
yr2=yr1+Lw*sin(ralfa)
DWb2=Dw2+Lw*sin(ralfa/2)
dinn2=yr2-DWb2*cos(ralfa)/2
dinb2=yr2-DWb2*cos(ralfa)
bb2=xr2+DWb2*sin(ralfa)
tx=xr1-Dw2*sin(ralfa)
ty=yr1+Dw2*cos(ralfa)
tx2=xr2-DWb2*sin(ralfa)
ty2=yr2+DWb2*cos(ralfa)
Dv2=ty-tx*tan(ralfa*1.5)
Db2=ty2+(C2-tx2)*tan(ralfa*1.5)
hin=dinb2-din2
din2v=din2+hin*0.05
dinb2v=dinb2+hin*0.2
x2r2=b2-Bvr*0.06
x2r1=x2r2-Lw*cos(ralfa)
b2b2=x2r1-DWb2*sin(ralfa)
T2=b2
t2y=yr1+Dw2*cos(ralfa)
t2x=b2-(x2r2+Dw2*sin(ralfa))
D2v2=t2y-t2x*tan(ralfa*1.5)

'++++++++++++++++++++
SUB LINE (x1,y1,x2,y2,t) 
Doc.ksLineSEG x1,y1,x2,y2,t 
END SUB
'++++++++++++++++++++

SUB ARC (xc,yc,r,x1,y1,x2,y2,n,s)
Doc.ksArcByPoint xc,yc,r,x1,y1,x2,y2,n,s
END SUB
'++++++++++++++++++++

SUB Script_OnLoad()

doc.ksColouring &HFE000000
Contur
doc.ksEndObj

If PAR_AXIS = 1 Then 
Line -b2-2,0,b2+2,0,3
End If 

Select Case DETAIL_LEVEL
      Case GCV_EXTENDED:

FOR oh=-1 TO 1 STEP 2
	FOR ov=-1 TO 1 STEP 2
IF oh=ov THEN
napv=1 
ELSE
napv=-1 END IF
	InsideRing oh,ov,napv
	NEXT
NEXT

FOR oh=-1 TO 1 STEP 2
	FOR ov=-1 TO 1 STEP 2
Roller oh,ov,xr1,yr1,xr2,yr2,Dw2,DWb2,ralfa
Roller oh,ov,x2r1,yr2,x2r2,yr1,DWb2,Dw2,-ralfa

	NEXT
NEXT

FOR oh=-1 TO 1 STEP  2 
FOR ov=-1 TO 1  STEP 2 
IF oh=ov Then
	  napv=1
  Else
  napv=-1 
END IF 

OutsideRing oh,ov,napv 
NEXT 
NEXT

InsideBushing 1
InsideBushing -1

      Case  GCV_STANDARD:

InsideRing 1,1,1
InsideRing -1,1,-1

Roller 1,1,xr1,yr1,xr2,yr2,Dw2,DWb2,ralfa
Roller 1,1,x2r1,yr2,x2r2,yr1,DWb2,Dw2,-ralfa

Roller -1,1,xr1,yr1,xr2,yr2,Dw2,DWb2,ralfa
Roller -1,1,x2r1,yr2,x2r2,yr1,DWb2,Dw2,-ralfa

OutsideRing 1,1,1
OutsideRing -1,1,-1

 InsideBushing 1   
      
DrawSimple -1,-1,1
DrawSimple 1,-1,-1
      Case  GCV_SIMPLIFIED:

DrawSimple 1,1,1
DrawSimple -1,1,-1

DrawSimple -1,-1,1
DrawSimple 1,-1,-1

      End Select 


END SUB
'+++++++++++++++++++++++++++++

SUB InsideRing (oh,ov,napv)

Line b1*oh,dinb2*ov,b1*oh,(din2+r)*ov,1
Arc (b1+r)*oh,(din2+r)*ov,r,b1*oh,(din2+r)*ov,(b1+r)*oh,din2*ov,napv,1
Line (b1+r)*oh,din2*ov,(b2-r)*oh,din2*ov,1
Arc (b2-r)*oh,(din2+r)*ov,r,(b2-r)*oh,din2*ov,b2*oh,(din2+r)*ov,napv,1
Line b2*oh,(din2+r)*ov,b2*oh,dinb2*ov,1
Line b2*oh,dinb2*ov,(x2r2-(yr1-dinb2)*tan(ralfa))*oh,dinb2*ov,1
Line (x2r2-(yr1-dinb2)*tan(ralfa))*oh,dinb2*ov,(x2r2-Dw2*sin(ralfa))*oh,(yr1-Dw2*cos(ralfa))*ov,1
Line (x2r2-Dw2*sin(ralfa))*oh,(yr1-Dw2*cos(ralfa))*ov,(x2r1-DWb2*sin(ralfa))*oh,(yr2-DWb2*cos(ralfa))*ov,1
'Line (x2r1-DWb2*sin(ralfa))*oh,(yr2-DWb2*cos(ralfa))*ov,x2r1*oh,yr2*ov,1
'Line x2r1*oh,yr2*ov,xr2*oh,yr2*ov,1
Line (x2r1-DWb2*sin(ralfa))*oh,(yr2-DWb2*cos(ralfa))*ov,(x2r1-(yr2-dinn2)*tan(ralfa))*oh,dinn2*ov,1
Line (x2r1-(yr2-dinn2)*tan(ralfa))*oh,dinn2*ov,(xr2+(yr2-dinn2)*tan(ralfa))*oh,dinn2*ov,1
Line (xr2+(yr2-dinn2)*tan(ralfa))*oh,dinn2*ov,(xr2+DWb2*sin(ralfa))*oh,(yr2-DWb2*cos(ralfa))*ov,1
Line (xr2+DWb2*sin(ralfa))*oh,(yr2-DWb2*cos(ralfa))*ov,(xr1+Dw2*sin(ralfa))*oh,(yr1-Dw2*cos(ralfa))*ov,1
Line (xr1+Dw2*sin(ralfa))*oh,(yr1-Dw2*cos(ralfa))*ov,(xr1+(yr1-dinb2)*tan(ralfa))*oh,dinb2*ov,1
Line (xr1+(yr1-dinb2)*tan(ralfa))*oh,dinb2*ov,b1*oh,dinb2*ov,1

Doc.kshatch  0, hatchAngle-90, hatchStep, 0, 0, 0   
Line b1*oh,dinb2*ov,b1*oh,(din2+r)*ov,1
Arc (b1+r)*oh,(din2+r)*ov,r,b1*oh,(din2+r)*ov,(b1+r)*oh,din2*ov,napv,1
Line (b1+r)*oh,din2*ov,(b2-r)*oh,din2*ov,1
Arc (b2-r)*oh,(din2+r)*ov,r,(b2-r)*oh,din2*ov,b2*oh,(din2+r)*ov,napv,1
Line b2*oh,(din2+r)*ov,b2*oh,dinb2*ov,1
Line b2*oh,dinb2*ov,(x2r2-(yr1-dinb2)*tan(ralfa))*oh,dinb2*ov,1
Line (x2r2-(yr1-dinb2)*tan(ralfa))*oh,dinb2*ov,(x2r2-Dw2*sin(ralfa))*oh,(yr1-Dw2*cos(ralfa))*ov,1
Line (x2r2-Dw2*sin(ralfa))*oh,(yr1-Dw2*cos(ralfa))*ov,(x2r1-DWb2*sin(ralfa))*oh,(yr2-DWb2*cos(ralfa))*ov,1
'Line (x2r1-DWb2*sin(ralfa))*oh,(yr2-DWb2*cos(ralfa))*ov,x2r1*oh,yr2*ov,1
'Line x2r1*oh,yr2*ov,xr2*oh,yr2*ov,1
Line (x2r1-DWb2*sin(ralfa))*oh,(yr2-DWb2*cos(ralfa))*ov,(x2r1-(yr2-dinn2)*tan(ralfa))*oh,dinn2*ov,1
Line (x2r1-(yr2-dinn2)*tan(ralfa))*oh,dinn2*ov,(xr2+(yr2-dinn2)*tan(ralfa))*oh,dinn2*ov,1
Line (xr2+(yr2-dinn2)*tan(ralfa))*oh,dinn2*ov,(xr2+DWb2*sin(ralfa))*oh,(yr2-DWb2*cos(ralfa))*ov,1
Line (xr2+DWb2*sin(ralfa))*oh,(yr2-DWb2*cos(ralfa))*ov,(xr1+Dw2*sin(ralfa))*oh,(yr1-Dw2*cos(ralfa))*ov,1
Line (xr1+Dw2*sin(ralfa))*oh,(yr1-Dw2*cos(ralfa))*ov,(xr1+(yr1-dinb2)*tan(ralfa))*oh,dinb2*ov,1
Line (xr1+(yr1-dinb2)*tan(ralfa))*oh,dinb2*ov,b1*oh,dinb2*ov,1
Doc.ksEndObj

If PAR_AXIS = 1 Then 
Line b1*oh,(din2+r)*ov,b1*oh,0,1
Line (b1+r)*oh,din2*ov,(b1+r)*oh,0,1
Line (b2-r)*oh,din2*ov,(b2-r)*oh,0,1
Line b2*oh,(din2+r)*ov,b2*oh,0,1
End If 
END SUB
'+++++++++++++++++++++++++++++

SUB Roller (oh,ov,x1,y1,x2,y2,D1,D2,ralfa)

Line (x1-2*cos(ralfa))*oh,(y1-2*sin(ralfa))*ov,(x2+2*cos(ralfa))*oh,(y2+2*sin(ralfa))*ov,3

Line (x1-D1*sin(ralfa))*oh,(y1+D1*cos(ralfa))*ov,(x1+D1*sin(ralfa))*oh,(y1-D1*cos(ralfa))*ov,1
Line (x1+D1*sin(ralfa))*oh,(y1-D1*cos(ralfa))*ov,(x2+D2*sin(ralfa))*oh,(y2-D2*cos(ralfa))*ov,1
Line (x2+D2*sin(ralfa))*oh,(y2-D2*cos(ralfa))*ov,(x2-D2*sin(ralfa))*oh,(y2+D2*cos(ralfa))*ov,1
Line (x2-D2*sin(ralfa))*oh,(y2+D2*cos(ralfa))*ov,(x1-D1*sin(ralfa))*oh,(y1+D1*cos(ralfa))*ov,1

END SUB
'+++++++++++++++++++++++++++++

SUB OutsideRing (oh,ov,napv)
B=PAR_B
x1=C2-B/2
Line 0,D2*ov,(x1-r)*oh,D2*ov,1
Arc (x1-r)*oh,(D2-r)*ov,r,(x1-r)*oh,D2*ov,x1*oh,(D2-r)*ov,-napv,1
Line x1*oh,(D2-r)*ov,x1*oh,(Dv2+x1*tan(ralfa*1.5))*ov,1
Line x1*oh,(Dv2+x1*tan(ralfa*1.5))*ov,b1*0.8*oh,(Dv2+b1*0.8*tan(ralfa*1.5))*ov,1
Line b1*0.8*oh,(Dv2+b1*0.8*tan(ralfa*1.5))*ov,0,(Dv2+b1*0.8*tan(ralfa*1.5))*ov,1

Doc.kshatch  0, hatchAngle, hatchStep, 0, 0, 0   
Line 0,D2*ov,(x1-r)*oh,D2*ov,1
Arc (x1-r)*oh,(D2-r)*ov,r,(x1-r)*oh,D2*ov,x1*oh,(D2-r)*ov,-napv,1
Line x1*oh,(D2-r)*ov,x1*oh,(Dv2+x1*tan(ralfa*1.5))*ov,1
Line x1*oh,(Dv2+x1*tan(ralfa*1.5))*ov,b1*0.8*oh,(Dv2+b1*0.8*tan(ralfa*1.5))*ov,1
Line b1*0.8*oh,(Dv2+b1*0.8*tan(ralfa*1.5))*ov,0,(Dv2+b1*0.8*tan(ralfa*1.5))*ov,1
	Line 0,(Dv2+b1*0.8*tan(ralfa*1.5))*ov,0,D2*ov,1
Doc.ksEndObj

Line b1*0.8*oh,(Dv2+b1*0.8*tan(ralfa*1.5))*ov,b1*0.8*oh,dinb2v*ov,1

x2=C2+B/2
Line (x2+r)*oh,D2*ov,(T2-r)*oh,D2*ov,1
Arc (T2-r)*oh,(D2-r)*ov,r,(T2-r)*oh,D2*ov,T2*oh,(D2-r)*ov,-napv,1
Line T2*oh,(D2-r)*ov,T2*oh,D2v2*ov,1
Line T2*oh,D2v2*ov,x2*oh,(Dv2+x1*tan(ralfa*1.5))*ov,1
Line x2*oh,(Dv2+x1*tan(ralfa*1.5))*ov,x2*oh,(D2-r)*ov,1
Arc (x2+r)*oh,(D2-r)*ov,r,x2*oh,(D2-r)*ov,(x2+r)*oh,D2*ov,-napv,1

Doc.kshatch  0, hatchAngle, hatchStep, 0, 0, 0   
Line (x2+r)*oh,D2*ov,(T2-r)*oh,D2*ov,1
Arc (T2-r)*oh,(D2-r)*ov,r,(T2-r)*oh,D2*ov,T2*oh,(D2-r)*ov,-napv,1
Line T2*oh,(D2-r)*ov,T2*oh,D2v2*ov,1
Line T2*oh,D2v2*ov,x2*oh,(Dv2+x1*tan(ralfa*1.5))*ov,1
Line x2*oh,(Dv2+x1*tan(ralfa*1.5))*ov,x2*oh,(D2-r)*ov,1
Arc (x2+r)*oh,(D2-r)*ov,r,x2*oh,(D2-r)*ov,(x2+r)*oh,D2*ov,-napv,1
Doc.ksEndObj

Line x1*oh,(D2-r)*ov,x2*oh,(D2-r)*ov,1
Line x2*oh,(D2-r)*ov,x2*oh,(Dv2+x1*tan(ralfa*1.5))*ov,1
Line x2*oh,(Dv2+x1*tan(ralfa*1.5))*ov,x1*oh,(Dv2+x1*tan(ralfa*1.5))*ov,1
Line x1*oh,(Dv2+x1*tan(ralfa*1.5))*ov,x1*oh,(D2-r)*ov,1

Doc.kshatch  0, hatchAngle-90, hatchStep/2, 0, 0, 0   
Line x1*oh,(D2-r)*ov,x2*oh,(D2-r)*ov,1
Line x2*oh,(D2-r)*ov,x2*oh,(Dv2+x1*tan(ralfa*1.5))*ov,1
Line x2*oh,(Dv2+x1*tan(ralfa*1.5))*ov,x1*oh,(Dv2+x1*tan(ralfa*1.5))*ov,1
Line x1*oh,(Dv2+x1*tan(ralfa*1.5))*ov,x1*oh,(D2-r)*ov,1
Doc.ksEndObj

y1=(Dv2+x1*tan(ralfa*1.5))
Line x1*oh,y1*ov,x1*oh,(yr2-(x1-xr2)/tan(ralfa))*ov,1
Line x2*oh,y1*ov,x2*oh,(yr2-(x2r1-x2)/tan(ralfa))*ov,1


'Line 0,Dv2*ov,C2*oh,Db2*ov,1
'Line C2*oh,Db2*ov,b2*oh,D2v2*ov,1
'Line b2*oh,D2v2*ov,b2*oh,(D2-r)*ov,1
'Arc (b2-r)*oh,(D2-r)*ov,r,b2*oh,(D2-r)*ov,(b2-r)*oh,D2*ov,napv,1
'Line (b2-r)*oh,D2*ov,0,D2*ov,1

'Doc.kshatch  0, hatchAngle, hatchStep, 0, 0, 0   
'Line 0,Dv2*ov,C2*oh,Db2*ov,1
'Line C2*oh,Db2*ov,b2*oh,D2v2*ov,1
'Line b2*oh,D2v2*ov,b2*oh,(D2-r)*ov,1
'Arc (b2-r)*oh,(D2-r)*ov,r,b2*oh,(D2-r)*ov,(b2-r)*oh,D2*ov,napv,1
'Line (b2-r)*oh,D2*ov,0,D2*ov,1
'Line 0,D2*ov,0,Dv2*ov,1
'Doc.ksEndObj

Line b2*oh,D2v2*ov,b2*oh,dinb2*ov,1
END SUB
'+++++++++++++++++++++++++++++++++++
SUB InsideBushing (ov)
Line -b1,din2v*ov,-b1,dinb2v*ov,1
Line -b1,dinb2v*ov,b1,dinb2v*ov,1
Line b1,dinb2v*ov,b1,din2v*ov,1
Line b1,din2v*ov,-b1,din2v*ov,1

Doc.kshatch  0, hatchAngle, hatchStep/2, 0, 0, 0   
Line -b1,din2v*ov,-b1,dinb2v*ov,1
Line -b1,dinb2v*ov,b1,dinb2v*ov,1
Line b1,dinb2v*ov,b1,din2v*ov,1
Line b1,din2v*ov,-b1,din2v*ov,1
Doc.ksEndObj
End SUB
'++++++
Sub Contur 
For oh=-1 TO 1 STEP 2
	FOR ov=-1 TO 1 STEP 2
IF oh=ov THEN
napv=1 
ELSE
napv=-1 END IF
	InsideRing_app oh,ov,napv
	NEXT
NEXT


FOR oh=-1 TO 1 STEP  2 
FOR ov=-1 TO 1  STEP 2 
IF oh=ov Then
	  napv=1
  Else
  napv=-1 
END IF 
OutsideRing_app oh,ov,napv 
NEXT 
NEXT
End Sub
'+++
Sub InsideRing_app (oh,ov,napv)
Arc (b2-r)*oh,(din2+r)*ov,r,(b2-r)*oh,din2*ov,b2*oh,(din2+r)*ov,napv,1
Line b2*oh,(din2+r)*ov,b2*oh,dinb2*ov,1
Line b2*oh,(din2+r)*ov,b2*oh,0,1
End Sub
'+++
Sub OutsideRing_app(oh,ov,napv)
B=PAR_B
x1=C2-B/2
Line 0,D2*ov,(x1-r)*oh,D2*ov,1
Arc (x1-r)*oh,(D2-r)*ov,r,(x1-r)*oh,D2*ov,x1*oh,(D2-r)*ov,-napv,1
Line x1*oh,(D2-r)*ov,x1*oh,(Dv2+x1*tan(ralfa*1.5))*ov,1
Line b1*0.8*oh,(Dv2+b1*0.8*tan(ralfa*1.5))*ov,b1*0.8*oh,dinb2v*ov,1
x2=C2+B/2
Line (x2+r)*oh,D2*ov,(T2-r)*oh,D2*ov,1
Arc (T2-r)*oh,(D2-r)*ov,r,(T2-r)*oh,D2*ov,T2*oh,(D2-r)*ov,-napv,1
Line T2*oh,(D2-r)*ov,T2*oh,D2v2*ov,1

Line x2*oh,(Dv2+x1*tan(ralfa*1.5))*ov,x2*oh,(D2-r)*ov,1
Arc (x2+r)*oh,(D2-r)*ov,r,x2*oh,(D2-r)*ov,(x2+r)*oh,D2*ov,-napv,1
Line x1*oh,(D2-r)*ov,x2*oh,(D2-r)*ov,1
Line x2*oh,(D2-r)*ov,x2*oh,(Dv2+x1*tan(ralfa*1.5))*ov,1
Line x1*oh,(Dv2+x1*tan(ralfa*1.5))*ov,x1*oh,(D2-r)*ov,1
Line b2*oh,D2v2*ov,b2*oh,dinb2*ov,1
End Sub
'++++++
SUB DrawSimple (oh,ov,napv)

B=PAR_B
x1=C2-B/2
Line 0,D2*ov,(x1-r)*oh,D2*ov,1
Arc (x1-r)*oh,(D2-r)*ov,r,(x1-r)*oh,D2*ov,x1*oh,(D2-r)*ov,-napv,1
'''Line x1*oh,(D2-r)*ov,x1*oh,(Dv2+x1*tan(ralfa*1.5))*ov,1
'''Line x1*oh,(Dv2+x1*tan(ralfa*1.5))*ov,b1*0.8*oh,(Dv2+b1*0.8*tan(ralfa*1.5))*ov,1
'''Line b1*0.8*oh,(Dv2+b1*0.8*tan(ralfa*1.5))*ov,0,(Dv2+b1*0.8*tan(ralfa*1.5))*ov,1

'''Line b1*0.8*oh,(Dv2+b1*0.8*tan(ralfa*1.5))*ov,b1*0.8*oh,dinb2v*ov,1

x2=C2+B/2
Line (x2+r)*oh,D2*ov,(T2-r)*oh,D2*ov,1
Arc (T2-r)*oh,(D2-r)*ov,r,(T2-r)*oh,D2*ov,T2*oh,(D2-r)*ov,-napv,1

Line T2*oh,(D2-r)*ov,T2*oh,D2v2*ov,1
'''Line T2*oh,D2v2*ov,x2*oh,(Dv2+x1*tan(ralfa*1.5))*ov,1

''Line x2*oh,(Dv2+x1*tan(ralfa*1.5))*ov,x2*oh,(D2-r)*ov,1

Arc (x2+r)*oh,(D2-r)*ov,r,x2*oh,(D2-r)*ov,(x2+r)*oh,D2*ov,-napv,1


Line x1*oh,(D2-r)*ov,x2*oh,(D2-r)*ov,1
'''Line x2*oh,(D2-r)*ov,x2*oh,(Dv2+x1*tan(ralfa*1.5))*ov,1
'''Line x2*oh,(Dv2+x1*tan(ralfa*1.5))*ov,x1*oh,(Dv2+x1*tan(ralfa*1.5))*ov,1
'''Line x1*oh,(Dv2+x1*tan(ralfa*1.5))*ov,x1*oh,(D2-r)*ov,1


y1=(Dv2+x1*tan(ralfa*1.5))
'''Line x1*oh,y1*ov,x1*oh,(yr2-(x1-xr2)/tan(ralfa))*ov,1
'''Line x2*oh,y1*ov,x2*oh,(yr2-(x2r1-x2)/tan(ralfa))*ov,1

Line b2*oh,D2v2*ov,b2*oh,dinb2*ov,1

'+++++
'''Line b1*oh,dinb2*ov,b1*oh,(din2+r)*ov,1'''
'''Arc (b1+r)*oh,(din2+r)*ov,r,b1*oh,(din2+r)*ov,(b1+r)*oh,din2*ov,napv,1
Line (b1+r)*oh,din2*ov,(b2-r)*oh,din2*ov,1''''

Line (b1+r)*oh,din2*ov,0,din2*ov,1''''

Arc (b2-r)*oh,(din2+r)*ov,r,(b2-r)*oh,din2*ov,b2*oh,(din2+r)*ov,napv,1
Line b2*oh,(din2+r)*ov,b2*oh,dinb2*ov,1

'''Line b2*oh,dinb2*ov,(x2r2-(yr1-dinb2)*tan(ralfa))*oh,dinb2*ov,1
'''Line (x2r2-(yr1-dinb2)*tan(ralfa))*oh,dinb2*ov,(x2r2-Dw2*sin(ralfa))*oh,(yr1-Dw2*cos(ralfa))*ov,1
'''Line (x2r2-Dw2*sin(ralfa))*oh,(yr1-Dw2*cos(ralfa))*ov,(x2r1-DWb2*sin(ralfa))*oh,(yr2-DWb2*cos(ralfa))*ov,1
'Line (x2r1-DWb2*sin(ralfa))*oh,(yr2-DWb2*cos(ralfa))*ov,x2r1*oh,yr2*ov,1
'Line x2r1*oh,yr2*ov,xr2*oh,yr2*ov,1
'''Line (x2r1-DWb2*sin(ralfa))*oh,(yr2-DWb2*cos(ralfa))*ov,(x2r1-(yr2-dinn2)*tan(ralfa))*oh,dinn2*ov,1
'''Line (x2r1-(yr2-dinn2)*tan(ralfa))*oh,dinn2*ov,(xr2+(yr2-dinn2)*tan(ralfa))*oh,dinn2*ov,1
'''Line (xr2+(yr2-dinn2)*tan(ralfa))*oh,dinn2*ov,(xr2+DWb2*sin(ralfa))*oh,(yr2-DWb2*cos(ralfa))*ov,1
'''Line (xr2+DWb2*sin(ralfa))*oh,(yr2-DWb2*cos(ralfa))*ov,(xr1+Dw2*sin(ralfa))*oh,(yr1-Dw2*cos(ralfa))*ov,1
'''Line (xr1+Dw2*sin(ralfa))*oh,(yr1-Dw2*cos(ralfa))*ov,(xr1+(yr1-dinb2)*tan(ralfa))*oh,dinb2*ov,1
'''Line (xr1+(yr1-dinb2)*tan(ralfa))*oh,dinb2*ov,b1*oh,dinb2*ov,1

If PAR_AXIS = 1 Then 
'''Line b1*oh,(din2+r)*ov,b1*oh,0,1
'''Line (b1+r)*oh,din2*ov,(b1+r)*oh,0,1
Line (b2-r)*oh,din2*ov,(b2-r)*oh,0,1
Line b2*oh,(din2+r)*ov,b2*oh,0,1
End If 



  If PAR_Simpl_AXIS = 1 Then 
    Line -(b2-r)*oh,(D2-r)*ov,(b2-r)*oh, (din2+r)*ov,2
   ''NEW 
   Else 
   Delta = (D2-din2)*ov/3
    Line 0, din2*ov+delta, 0, D2*ov-delta,2
    Line 0,(D2+din2)*ov/2,Delta*oh/2,(D2+din2)*ov/2,2
   ''
  End If  

If PAR_Simpl_AXIS = 1 Then 
''  Line x1,y1,x3,y3,2
''  Line x2,y2,x4,y4,2
  Else 
 ''NEW 
''   Line b/3,(rn+rv)*0.5*ky,2*b/3,(rn+rv)*0.5*ky,2
''   Line b*0.5,((rn+rv)*0.5-b/6)*ky,b*0.5,((rn+rv)*0.5+b/6)*ky,2
   ''
  End If  
   
END SUB
'++++++
